export default {
  changeColor: function (el) {
    el.style.color = '#606266'
  },
  getIndexById: function (items, id) {
    let i = 0
    for (const item of items) {
      // eslint-disable-next-line eqeqeq
      if (item.id + '' == id + '') {
        return i
      }
      i++
    }
    // 不存在该id的项则返回-1
    return -1
  }
}
